This relates generally to graphics processing.
Conventionally, tessellated or non-tessellated triangles from the rasterizer are sent to a pixel shader for shading. Whenever possible, a depth-stencil test may be performed before shading to avoid unnecessary shading. In the pixel shader, color and texture may be applied to those triangles.
Generally the triangles are sent for shading in blocks of 2×2 pixels called a shading quad. The reason for this is that there are derivatives that must be determined for mip map calculations that involve calculating finite differences in x and y directions. Information from a group of pixels is used to calculate the derivatives.
Even if a triangle touches just one pixel, the shader still ends up using at least two other pixels so that the derivatives can be determined. The shading quad is static; it always is in the same screen position regardless of how triangles land on the screen.
In multi-sampled anti-aliasing (MSAA), the rasterizer typically tests at every sample location, whether the sample location is inside the triangle being rasterized or not. If the sample is inside the triangle, then the entire 2×2 quad is shaded.
For example 8× multi-sampled anti-aliasing shades eight samples the same way. If all eight samples are covered by the triangle, only the pixel center is shaded and all eight samples get that color. This is true even if the triangle only hits one of the samples. Four pixels are still shaded, using that color for only the one sample covered by the triangle. Sometimes it is possible to shade at locations other than pixel centers, e.g. centroid sampling.